<script language="javascript" type="text/javascript">
    // confirm
    function confirm_action() {
        if (confirm("Apakah anda yakin akan menghapus data ini?")) {
            return true;
        }
        return false;
    }
    $(document).ready(function() {
        // select box dosen
        $("#dosen").select2({
            placeholder: "Pilih Dosen",
            allowClear: true
        });
        // select box makul
        $("#makul").select2({
            placeholder: "Pilih Mata Kuliah",
            allowClear: true
        });
    });
</script>
<div class="breadcrumbs">
    <div class="container-fluid">
        <ul class="bread pull-left">
            <li><a href="#">Settings</a></li>
            <li><a href="{$config->site_url('pengaturan/dosenajar')}">Dosen Ajar</a></li>
            <li><a href="{$config->site_url('pengaturan/dosenajar/edit_group')}/{$set_dosenajar_kd}">Pengaturan</a></li>
            <li class="active"><a href="#">Hapus</a></li>
        </ul>
    </div>
</div>
<div class="row-fluid">
    <div class="span12">
        <div class="box">
            <div class="box-head">
                <h3>Hapus Dosen Ajar</h3>
            </div>
            <div class="box-content">
                <!-- notification template -->
                {include file="base/templates/notification.html"}
                <!-- end of notification template-->
                <form action="{$config->site_url('pengaturan/dosenajar/delete_dosenajar_process')}" class="form-horizontal" method="post" onsubmit="return confirm_action();">
                    <input type="hidden" name="set_dosenajar_kd" value="{$set_dosenajar_kd}" />
                    <input type="hidden" name="dosen_kd" value="{$dosen_kd}" />
                    <input type="hidden" name="makul_kd" value="{$makul_kd}" />
                    <fieldset>
                        <legend>Hapus Data</legend>
                    </fieldset>
                    <div class="control-group">
                        <label class="control-label">Dosen</label>
                        <div class="controls">
                            <select name="dosen_kd" id="dosen" disabled="disabled">
                                <option value=""></option>
                                {foreach from=$rs_dosen item=d}
                                <option value="{$d.user_id}" {if $dosen_kd|default:'' eq $d.user_id}selected='selected'{/if}>{$d.nama_lengkap}, {$d.dosen_gelar}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Mata Kuliah</label>
                        <div class="controls">
                            <select name="makul_kd" id="makul" disabled="disabled">
                                <option value=""></option>
                                {foreach from=$rs_makul item=m}
                                <option value="{$m.makul_kd}" {if $makul_kd|default:'' eq $m.makul_kd}selected='selected'{/if}>{$m.makul_nm}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="form-actions">
                        <button class="btn btn-danger" type="submit">Hapus</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>